package com.gxa.exchangerate.controller;

import com.gxa.common.R;
import com.gxa.common.entity.financial_management.RechargeManagement;
import com.gxa.exchangerate.service.RechargeManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/recharge")
public class RechargeManagementController {

    @Autowired
    private RechargeManagementService rechargeManagementService;

    @GetMapping("/selectRechargeManagementList")
    public R selectRechargeManagementList(Integer currentPage, Integer pageSize){
        return rechargeManagementService.selectRechargeManagementList(currentPage,pageSize);
    }

    //条件查询
    @GetMapping("/selectRechargeManagement")
    public R selectRechargeManagement(Integer currentPage, Integer pageSize, RechargeManagement rechargeManagement){
        return rechargeManagementService.selectRechargeManagement(currentPage,pageSize,rechargeManagement);
    }

    //初始添加充值
    @PostMapping("/addRechargeManagement")
    public R addRechargeManagement(@RequestBody RechargeManagement rechargeManagement){
        return rechargeManagementService.addRechargeManagement(rechargeManagement);

    }

}
